package com.itheima.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface BorrowMapper {
    @Select("select id from borrow_book where book_id=#{id}")
    boolean findByBook(Integer id);

    @Insert("insert into borrow_book values(null,#{id},#{userId})")
    boolean insert(Integer id, Integer userId);
}
